# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>

pkgname=adobe-source-serif-fonts
pkgver=4.005
pkgrel=1
pkgdesc="Serif typeface designed to complement Source Sans"
url="https://adobe-fonts.github.io/source-serif/"
arch=(any)
license=(custom)
provides=("adobe-source-serif-pro-fonts=$pkgver")
replaces=('adobe-source-serif-pro-fonts<=4.004-1')
_relver=${pkgver}R
_tarname=source-serif-$_relver
_oldver=3.001R
_oldname=source-serif-$_oldver
source=(
  "$_tarname.tar.gz::https://github.com/adobe-fonts/source-serif/archive/refs/tags/$_relver.tar.gz"
  "$_oldname.tar.gz::https://github.com/adobe-fonts/source-serif/archive/refs/tags/$_oldver.tar.gz"
)
b2sums=('7dec81fd559a0bf620b2351dc26f2a481825a77148019797b5726699cc3e5977194278e8ef5cc6acd2dea8e30f8b19afa12dd301abbbf75bb192a9e7bfbde51d'
        'f6d7c5f9a521165bb4557fea36cf53cf535697f7114186c68f5702ccbcb7edb228b3d43bb80a7e4cfe7ea9c55a8194eec31fd33be5d88039264ec5955127191d')

package() {
  # "Source Serif Pro"
  cd $_oldname
  install -Dt "$pkgdir/usr/share/fonts/${pkgname%-fonts}" -m644 OTF/*.otf VAR/*.otf
  cd ..

  # "Source Serif 4"
  cd $_tarname
  install -Dt "$pkgdir/usr/share/fonts/${pkgname%-fonts}" -m644 OTF/*.otf VAR/*.otf
  install -Dt "$pkgdir/usr/share/licenses/$pkgname" -m644 LICENSE.md
}

# vim:set sw=2 sts=-1 et:
